home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / intuition / imageclass.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  6KB  |  208 lines

  1. #ifndef INTUITION_IMAGECLASS_H
  2. #define INTUITION_IMAGECLASS_H TRUE
  3. /*
  4. **  $Filename: intuition/imageclass.h $
  5. **  $Release: 2.04 $
  6. **  $Revision: 36.1 $
  7. **  $Date: 90/11/01 $
  8. **
  9. **  Definitions for the image classes
  10. **
  11. **  (C) Copyright 1985,1986,1987,1988,1989,1990 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15.  
  16. #ifndef UTILITY_TAGITEM_H
  17. #include <utility/tagitem.h>
  18. #endif
  19.  
  20. /*
  21.  * NOTE:  <intuition/iobsolete.h> is included at the END of this file!
  22.  */
  23.  
  24. #define CUSTOMIMAGEDEPTH    (-1)
  25. /* if image.Depth is this, it's a new Image class object */
  26.  
  27. /* some convenient macros and casts */
  28. #define GADGET_BOX( g )    ( (struct IBox *) &((struct Gadget *)(g))->LeftEdge )
  29. #define IM_BOX( im )    ( (struct IBox *) &((struct Image *)(im))->LeftEdge )
  30. #define IM_FGPEN( im )    ( (im)->PlanePick )
  31. #define IM_BGPEN( im )    ( (im)->PlaneOnOff )
  32.  
  33. /******************************************************/
  34. #define IA_Dummy        (TAG_USER + 0x20000)
  35. #define IA_Left            (IA_Dummy + 0x01)
  36. #define IA_Top            (IA_Dummy + 0x02)
  37. #define IA_Width        (IA_Dummy + 0x03)
  38. #define IA_Height        (IA_Dummy + 0x04)
  39. #define IA_FGPen        (IA_Dummy + 0x05)
  40.             /* IA_FGPen also means "PlanePick"    */
  41. #define IA_BGPen        (IA_Dummy + 0x06)
  42.             /* IA_BGPen also means "PlaneOnOff"    */
  43. #define IA_Data            (IA_Dummy + 0x07)
  44.             /* bitplanes, for classic image,
  45.              * other image classes may use it for other things
  46.              */
  47. #define IA_LineWidth        (IA_Dummy + 0x08)
  48. #define IA_Pens            (IA_Dummy + 0x0E)
  49.             /* pointer to UWORD pens[],
  50.              * ala DrawInfo.Pens, MUST be
  51.              * terminated by ~0.  Some classes can
  52.              * choose to have this, or SYSIA_DrawInfo,
  53.              * or both.
  54.              */
  55. #define IA_Resolution        (IA_Dummy + 0x0F)
  56.             /* packed uwords for x/y resolution into a longword
  57.              * ala DrawInfo.Resolution
  58.              */
  59.  
  60. /**** see class documentation to learn which    *****/
  61. /**** classes recognize these            *****/
  62. #define IA_APattern        (IA_Dummy + 0x10)
  63. #define IA_APatSize        (IA_Dummy + 0x11)
  64. #define IA_Mode            (IA_Dummy + 0x12)
  65. #define IA_Font            (IA_Dummy + 0x13)
  66. #define IA_Outline        (IA_Dummy + 0x14)
  67. #define IA_Recessed        (IA_Dummy + 0x15)
  68. #define IA_DoubleEmboss        (IA_Dummy + 0x16)
  69. #define IA_EdgesOnly        (IA_Dummy + 0x17)
  70.  
  71. /**** "sysiclass" attributes            *****/
  72. #define SYSIA_Size        (IA_Dummy + 0x0B)
  73.             /* #define's below        */
  74. #define SYSIA_Depth        (IA_Dummy + 0x0C)
  75.             /* this is unused by Intuition.  SYSIA_DrawInfo
  76.              * is used instead for V36
  77.              */
  78. #define SYSIA_Which        (IA_Dummy + 0x0D)
  79.             /* see #define's below    */
  80. #define SYSIA_DrawInfo        (IA_Dummy + 0x18)
  81.             /* pass to sysiclass, please */
  82.  
  83. /*****    obsolete: don't use these, use IA_Pens    *****/
  84. #define SYSIA_Pens        IA_Pens
  85. #define IA_ShadowPen        (IA_Dummy + 0x09)
  86. #define IA_HighlightPen        (IA_Dummy + 0x0A)
  87.  
  88. /** next attribute: (IA_Dummy + 0x19)    **/
  89. /*************************************************/
  90.  
  91. /* data values for SYSIA_Size    */
  92. #define SYSISIZE_MEDRES    (0)
  93. #define SYSISIZE_LOWRES    (1)
  94. #define SYSISIZE_HIRES    (2)
  95.  
  96. /*
  97.  * SYSIA_Which tag data values:
  98.  * Specifies which system gadget you want an image for.
  99.  * Some numbers correspond to internal Intuition #defines
  100.  */
  101. #define DEPTHIMAGE    (0x00L)
  102. #define ZOOMIMAGE    (0x01L)
  103. #define SIZEIMAGE    (0x02L)
  104. #define CLOSEIMAGE    (0x03L)
  105. #define SDEPTHIMAGE    (0x05L)    /* screen depth gadget */
  106. #define LEFTIMAGE    (0x0AL)
  107. #define UPIMAGE        (0x0BL)
  108. #define RIGHTIMAGE    (0x0CL)
  109. #define DOWNIMAGE    (0x0DL)
  110. #define CHECKIMAGE    (0x0EL)
  111. #define MXIMAGE        (0x0FL)    /* mutual exclude "button" */
  112.  
  113.  
  114. /* image message id's    */
  115. #define    IM_DRAW    0x202L    /* draw yourself, with "state"        */
  116. #define    IM_HITTEST    0x203L    /* return TRUE if click hits image    */
  117. #define    IM_ERASE    0x204L    /* erase yourself            */
  118. #define    IM_MOVE    0x205L    /* draw new and erase old, smoothly    */
  119.  
  120. #define    IM_DRAWFRAME    0x206L    /* draw with specified dimensions    */
  121. #define    IM_FRAMEBOX    0x207L    /* get recommended frame around some box*/
  122. #define    IM_HITFRAME    0x208L    /* hittest with dimensions        */
  123. #define    IM_ERASEFRAME 0x209L    /* hittest with dimensions        */
  124.  
  125. /* image draw states or styles, for IM_DRAW */
  126. #define    IDS_NORMAL        (0L)
  127. #define    IDS_SELECTED        (1L)    /* for selected gadgets        */
  128. #define    IDS_DISABLED        (2L)    /* for disabled gadgets        */
  129. #define    IDS_BUSY        (3L)    /* for future functionality */
  130. #define    IDS_INDETERMINATE    (4L)    /* for future functionality */
  131. #define    IDS_INACTIVENORMAL    (5L)    /* normal, in inactive window border */
  132. #define    IDS_INACTIVESELECTED    (6L)    /* selected, in inactive border */
  133. #define    IDS_INACTIVEDISABLED    (7L)    /* disabled, in inactive border */
  134.  
  135. /* oops, please forgive spelling error by jimm */
  136. #define IDS_INDETERMINANT IDS_INDETERMINATE
  137.  
  138. /* IM_FRAMEBOX    */
  139. struct impFrameBox {
  140.     ULONG        MethodID;
  141.     struct IBox    *imp_ContentsBox;    /* input: relative box of contents */
  142.     struct IBox    *imp_FrameBox;        /* output: rel. box of encl frame  */
  143.     struct DrawInfo    *imp_DrInfo;
  144.     ULONG    imp_FrameFlags;
  145. };
  146.  
  147. #define FRAMEF_SPECIFY    (1<<0)    /* Make do with the dimensions of FrameBox
  148.                  * provided.
  149.                  */
  150.  
  151. /* IM_DRAW, IM_DRAWFRAME    */
  152. struct impDraw {
  153.     ULONG        MethodID;
  154.     struct RastPort    *imp_RPort;
  155.     struct {
  156.     WORD    X;
  157.     WORD    Y;
  158.     }            imp_Offset;
  159.  
  160.     ULONG        imp_State;
  161.     struct DrawInfo    *imp_DrInfo;
  162.  
  163.     /* these parameters only valid for IM_DRAWFRAME */
  164.     struct {
  165.     WORD    Width;
  166.     WORD    Height;
  167.     }            imp_Dimensions;
  168. };
  169.  
  170. /* IM_ERASE, IM_ERASEFRAME    */
  171. /* NOTE: This is a subset of impDraw    */
  172. struct impErase {
  173.     ULONG        MethodID;
  174.     struct RastPort    *imp_RPort;
  175.     struct {
  176.     WORD    X;
  177.     WORD    Y;
  178.     }            imp_Offset;
  179.  
  180.     /* these parameters only valid for IM_ERASEFRAME */
  181.     struct {
  182.     WORD    Width;
  183.     WORD    Height;
  184.     }            imp_Dimensions;
  185. };
  186.  
  187. /* IM_HITTEST, IM_HITFRAME    */
  188. struct impHitTest {
  189.     ULONG        MethodID;
  190.     struct {
  191.     WORD    X;
  192.     WORD    Y;
  193.     }            imp_Point;
  194.  
  195.     /* these parameters only valid for IM_HITFRAME */
  196.     struct {
  197.     WORD    Width;
  198.     WORD    Height;
  199.     }            imp_Dimensions;
  200. };
  201.  
  202. /* Include obsolete identifiers: */
  203. #ifndef INTUITION_IOBSOLETE_H
  204. #include <intuition/iobsolete.h>
  205. #endif
  206.  
  207. #endif
  208.